// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import axios from 'axios'
import qs from 'qs'

import common from './commonfunction/common'// 引入全局公用js函数

// eslint-disable-next-line no-unused-vars
// import $ from 'jquery'
import 'styles/reset.css'
import 'styles/iconfont.css'
import 'styles/markdown.styl'
import 'animate.css'
// import 'bootstrap/dist/css/bootstrap.min.css'
// import 'bootstrap/dist/js/bootstrap.min'
import 'simplemde/dist/simplemde.min.css'
import 'font-awesome/css/font-awesome.min.css'
// eslint-disable-next-line
import 'styles/highlight.min.js'
import 'styles/github.min.css'
// 自定义命令代码高亮，在需要高亮的地方给标签加上 v-highlight 即可
Vue.directive('highlight', function (el) {
  let blocks = el.querySelectorAll('pre code')
  blocks.forEach((block) => {
    // eslint-disable-next-line
    hljs.highlightBlock(block)
  })
})

Vue.prototype.common = common
Vue.config.productionTip = false
Vue.prototype.$ajax = axios
Vue.prototype.$qs = qs

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
